package com.alibaba.travel.scenic.service.impl;

import com.alibaba.travel.scenic.dao.ScenicCategoryDao;
import com.alibaba.travel.scenic.entity.ScenicCategoryEntity;
import com.alibaba.travel.scenic.service.ScenicCategoryService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.alibaba.travel.common.utils.PageUtils;
import com.alibaba.travel.common.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("scenicCategoryService")
public class ScenicCategoryServiceImpl extends ServiceImpl<ScenicCategoryDao, ScenicCategoryEntity> implements ScenicCategoryService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<ScenicCategoryEntity> page = this.page(
                new Query<ScenicCategoryEntity>().getPage(params),
                new QueryWrapper<ScenicCategoryEntity>()
        );

        return new PageUtils(page);
    }

}